#define _CRT_SECURE_NO_WARNINGS 1

#include "SList.h"

void Test1()
{
	struct ListNode* n1 = (struct ListNode*)malloc(sizeof(struct ListNode));
	struct ListNode* n2 = (struct ListNode*)malloc(sizeof(struct ListNode));
	struct ListNode* n3 = (struct ListNode*)malloc(sizeof(struct ListNode));
	struct ListNode* n4 = (struct ListNode*)malloc(sizeof(struct ListNode));
	struct ListNode* n5 = (struct ListNode*)malloc(sizeof(struct ListNode));
	struct ListNode* n6 = (struct ListNode*)malloc(sizeof(struct ListNode));
	n1->val = 1;
	n2->val = 2;
	n3->val = 3;
	n4->val = 4;
	n5->val = 5;
	n6->val = 6;
	n1->next = n2;
	n2->next = n3;
	n3->next = n4;
	n4->next = n5;
	n5->next = n6;
	n6->next = NULL;

	struct ListNode* head = reverseList(n1);
	//head = removeElements(n4, 2);
	//struct ListNode* mid =  middleNode( n6);
	//printf("%d\n", mid->val);

	struct ListNode* findK=FindKthToTail(head, 3);
	printf("%d\n", findK->val);




}

void Test2()
{

}

int main()
{
	//Test1();
	Test2();

	return 0;
}